﻿@using NewRen.Models
@{
    ViewBag.Title = "牛人轶事修改";
    Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
    Anecdote anecdote = ViewBag.Anecdote as Anecdote;
}
<script src="~/Scripts/ckeditor/ckeditor.js"></script>

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>修改牛人轶事</h2>
        <ol class="breadcrumb">
            <li>
                <a href="/Admin/Home/Index">后台管理</a>
            </li>
            <li>
                <a>牛人轶事管理</a>
            </li>
            <li>
                <a>修改牛人轶事</a>
            </li>
        </ol>
    </div>
</div>
<div class="wrapper wrapper-content  animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <h5>牛人轶事修改 - <small></small> <small><a href="/Admin/Anecdote/Index">牛人轶事管理</a></small></h5>
                </div>
                <div class="ibox-content">
                    @using (Html.BeginForm("Edit", "Anecdote", FormMethod.Post, new { id = "frmEditAnecdote", @class = "form-horizontal" }))
                    {
                        @Html.AntiForgeryToken()
                        <input type="hidden" value="@anecdote.ID" name="ID" />
                        <div class="form-group">
                            <label class="col-sm-2 control-label">标题</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" value="@anecdote.Title" placeholder="标题" name="Title">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">描述</label>
                            <div class="col-sm-10">
                                <textarea name="Description" class="form-control">@anecdote.Description</textarea>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否发布</label>
                            <div class="col-sm-10">
                                <select class="form-control w-2" name="IsPublish">
                                    <option value="false" @(anecdote.IsPublish ? "" : "selected")>否</option>
                                    <option value="true" @(anecdote.IsPublish ? "selected" : "")>是</option>
                                </select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="submit">保存内容</button>
                                <button class="btn btn-white" type="reset">重置</button>
                            </div>
                            <span class="help-block m-b-none">@Html.ValidationSummary(true)</span>
                        </div>
                    }
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    CKEDITOR.replace('Description',
    {
        toolbar: 'Basic',
        width: "100%",
        height: "370px"
    });
</script>
